home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 April / macformat-023.iso / Shareware City / Developers / NeoPersist 3.0.8 folder / NeoBench / Includes / CNeoWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-13  |  2.4 KB  |  72 lines  |  [TEXT/MMCC]

  1. /*****************************************************************
  2.   CNeoWindow.h
  3.  
  4.   Header file for the CNeoWindow class.
  5. *****************************************************************/
  6.  
  7. #ifndef __CNeoWindow__
  8. #define __CNeoWindow__
  9.  
  10. #include <Timer.h>
  11. #include "LWindow.h"
  12. #include "LPeriodical.h"
  13. #include "LListener.h"
  14. #include "NeoBench.h"
  15.  
  16. class CNeoFilePP;
  17. class CRawText;
  18. class LEditField;
  19. class LButton;
  20. class CNeoWindow;
  21. class CNeoIndexIterator;
  22.  
  23. #define kTitlePICTID    129
  24.  
  25. class CNeoWindow : public LWindow, public LPeriodical, public LListener {
  26. public:
  27.                         CNeoWindow(const ResIDT aResID, CNeoDocPP *aDocument);
  28.  
  29.                         /** Drawing **/
  30.     void                DrawSelf(void);
  31.  
  32.                         /** Statistics **/
  33.     void                checkFileState(void);
  34.     void                ClearStatPanes(void);
  35.     short                getPhase(void) const;
  36.     long                getPhaseTarget(const short aPhase) const;
  37.     Boolean                getState(void) const;
  38.     void                getTargetTotals(void);
  39.     long                GetTotalNum(short index);
  40.     void                setDocument(CNeoDocPP *aDoc);
  41.     void                setPhase(const short aPhase);
  42.     void                setState(const Boolean aState);
  43.     void                UpdateCol(short aPhase, short aRow, long aValue);
  44.  
  45.                         /** Events/Drawing **/
  46.     virtual void        ClickInZoom(const EventRecord& inMacEvent, short inZoomDirection);
  47.     virtual void        doSomeWork(const short aPhase, TMTask *aTimer);
  48.     virtual Boolean        HandleKeyPress(const EventRecord &inKeyEvent);
  49.     virtual void        ListenToMessage(MessageT aMessage, void *aParam);
  50.     virtual void        SpendTime(const EventRecord &inMacEvent);
  51.  
  52. protected:
  53.     NeoPhase            fPhaseInfo[kMaxPhase +1];    // The main phases
  54.     Boolean                fState;                        // Running state
  55.     short                fPhase;                        // The current phase
  56.     CNeoIndexIterator *    fIterator;                    // For traversing index of objects
  57.     CNeoPersist *        fObject;                    // Object pointer for serially finding objects
  58.     long                col_value[3];                // 3 columns - soFar, PerRecord, Total
  59.     short                col_index;                    // Index into the column
  60.  
  61.     CRawText *            NeoRawTexts[kMaxPhase +1][kMaxCol +1];    // the texts displaying the numbers
  62.     LEditField *        NeoEditTexts[kMaxPhase +1];                // the TOTALS editable texts
  63.     CRawText *            NeoPhaseNames[kMaxPhase +1];            // Phase names
  64.     LButton *            NeoStopButton;                            // Stop button
  65.     LButton *            NeoGoButton;                            // Go button
  66.     CRawText *            fSizeStatic;                            // Object size label
  67.     LEditField *        fSizeText;                                // Object size text
  68.  
  69.     long                maxValue[kMaxPhase +1];
  70.     long                minValue[kMaxPhase +1];
  71. };
  72. #endif